package com.xiangzi.dropwizard.resources;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import com.xiangzi.dropwizard.core.Person;
import com.xiangzi.dropwizard.views.PersonView;

@Path("/people/{id}")
@Produces(MediaType.TEXT_HTML)
public class PersonResource {

	@GET
	public PersonView getPerson(@PathParam("id") String id) {
		Person person = new Person();
		person.setId(Long.parseLong(id));
		person.setFullName("fullName" + id);
		person.setJobTitle("jobTitle" + id);
		return new PersonView(person);
	}

}
